package com.onesports.intelligent.k12.polarlight.domain.dto.course;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.*;
import java.math.BigDecimal;

/**
 * @author FPH
 * @since 2022年7月10日20:03:18
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("拼班与价格对应DTO")
public class ClassMergeRuleIdAndPriceDTO {

    @ApiModelProperty("拼班ID")
    @NotBlank(message = "拼班ID不可为空")
    private String id;

    @ApiModelProperty("拼班价格")
    @NotNull(message = "拼班价格不可为空")
    @Digits(integer = 8, fraction=2, message = "价格超出限制")
    @DecimalMin(value = "0.00", message = "价格要大于等于0.00")
    private BigDecimal price;
}
